import json

import requests


def main():
    resp = requests.get('http://api.tianapi.com/guonei/?key=10b3a10615c82bfd59a8e6d65ccf3405&num=10')
    data_model = json.loads(resp.text)
    for news in data_model['newslist']:
        print(news['title'])


if __name__ == '__main__':
    main()
